import { defineStore } from "pinia";
import i18n from "@/plugins/i18n";

const useSettingsStore = defineStore("settings", {
  state: () => {
    return {
      theme: "",
      lang: i18n.global.locale
    };
  },
  getters: {
    getLang(state) {
      return state.lang;
    }
  },
  actions: {
    setLang(data) {
      this.lang = data;
    }
  },
  persist: true
});
export default useSettingsStore;
